Style

The Style object contains a collection of specific style settings that can be used to customize the UI of the hub, The settings are injected into the HubEmbedOptions object before being used in the hub method.

The style object is in effect a simple JavaScript array with specific items (enumerated below). The settings tightly follow the same settings as classic CSS.

The Style object is NOT the same as the AppStyles object used to format standalone Discover and Present content.

At the moment, the AppStyles cannot be used within an embedded Hub instance.

Styling Groups

  • The "tab" styles affect the the hub's tab section at the top of the UI
  • The "buttons" affect the small function buttons in the top right of the hubs UI
  • The "tiles' affect the tiled content contained within a given hub tab
  • The "picker" affects the pop-up widget picker for content and functionality that allows users to build their hub space.
  • The "container" is the broad, background canvas of the hub itself

Nested Structure

The following code snippet shows the ENTIRE Style structure with every property that can be set.

		
{
  "tabs": {
    "nonSelectedTab": {
      "color": "",
      "backgroundColor": "",
      "fontSize": ,
      "fontWeight": 
    },
    "selectedTab": {
      "color": "",
      "backgroundColor": "",
      "fontSize": ,
      "fontWeight": 
    },
    "border": "",
    "backgroundColor": "",
    "addTabIconColor": "",
    "deleteTabIconColor": ""
  },
  "buttons": {
    "color": "",
    "secondaryColor": "",
    "hoverColor": ""
  },
  "tiles": {
    "backgroundColor": "",
    "titleColor": "",
    "boxShadow": "",
    "addWidgetPrimaryColor": "",
    "addWidgetSecondaryColor": ""
  },
  "picker": {
    "backgroundColor": "",
    "tabs": {
      "nonSelectedTab": {
        "backgroundColor": "",
        "fontSize": ,
        "fontWeight": 
      },
      "selectedTab": {
        "backgroundColor": "",
        "fontSize": ,
        "fontWeight": 
      },
      "border": "",
      "backgroundColor": "",
      "addTabIconColor": "",
      "deleteTabIconColor": "",
      "iconColor": ""
    }
  },
  "container": {
    "border": ""
  },
  "canvas": {
    "backgroundColor": ""
  }
}

Flat vs Hierarchical

You can provide the object syntax hierarchically (as shown above), or flattened (see example below). When providing the flattened object, be sure to encase the keys in quotes.

Examples